﻿using System;

namespace Harvest.API.Attributes
{

    [AttributeUsage(AttributeTargets.All)]
    public class SerializationInfoAttribute : Attribute
    {
        public string NodeText { get; private set; }

        public string DataType { get; private set; }

        public bool IsNullable { get; set; }

        public SerializationInfoAttribute(string nodeText)
        {
            NodeText = nodeText;
        }

        public SerializationInfoAttribute(string nodeText, string dataType)
        {
            NodeText = nodeText;
            DataType = dataType;
        }

        public SerializationInfoAttribute(string nodeText, bool isNullable)
        {
            NodeText = nodeText;
            IsNullable = isNullable;
        }

        public SerializationInfoAttribute(string nodeText, string dataType, bool isNullable)
        {
            NodeText = nodeText;
            DataType = dataType;
            IsNullable = isNullable;
        }

    }

}